# 定义项目名称和版本
project('cms-c', 'c',
  version : '0.1.0',
  default_options : ['warning_level=3']
)

# 定义头文件目录
inc_dir = include_directories('src', 
'include', 
'cmscbb_common', 
'cms', 
'asn1',
'pki',
'x509')

src_files = [
    'src/cms_verify.c',
    'src/cmscbb_sdk.c',
    'src/cmscbb_asn1_decode.c', 
    'src/cmscbb_asn1_def.c', 
    'src/cmscbb_asn1_utils.c', 
    'src/cmscbb_base64.c', 
    'src/cmscbb_buf.c',
    'src/cmscbb_cms_parse.c',
    'src/cmscbb_crl_compare.c', 
    'src/cmscbb_list.c', 
    'src/cmscbb_pem_util.c',
    'src/cmscbb_pki.c', 
    'src/cmscbb_plt_proxy.c',
    'src/cmscbb_templ.c',
    'src/cmscbb_verify_info.c',
    'src/cmscbb_x509.c'
 ]

# 定义可执行文件目标，包含源文件和头文件目录
library('cmsvrf', src_files,
  include_directories : inc_dir,
  dependencies: [dependency('openssl')],
  c_args: ['-DCMSCBB_WITHOUT_SECUREC=1'],
  install : true
)
